%%%%% --------------------------------------------------------------------------------
%%
%%%%***************************** version information *********************************
%%
%% this is the "custom.sty" package used for configure document styles
%% rewritten by Jie Cheng<chengjie0827@gmail.com>
%% $Last-modified: 08 Jan 2015
%%
%% This program can be redistributed and/or modified under the terms
%% of the GNU Public License, version 2.
%%
%% This fork was created to satisfy personal taste in code.
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{sty/custom}
 [2015/01/05 v0.1 commons 
 macros package]
%%%%% --------------------------------------------------------------------------------
%%
%%%%********************************Declare Options**********************************
%%
%% end-user parameters, each option is declared by one declare option command
\DeclareOption*{% handle non-implemented options
    \PackageWarning{custom}{Unknown option '\CurrentOption'}%
}
%% terminates all options processing
\ProcessOptions\relax
%%%%% --------------------------------------------------------------------------------
%%
%%%%***************************User Defined Command***********************************
%%
%%% >>> Math
%%

\newcommand{\ds}{\displaystyle}% short command for displaystyle
\newcommand{\ve}{\varepsilon}% short command for epsilon
\newcommand{\der}[2]{\frac{d #1}{d #2}}% short command for derivative
\newcommand{\pder}[2]{\frac{\partial #1}{\partial #2}}% short command for pde
\newcommand{\argmin}{\operatornamewithlimits{arg\ min}}
\newcommand{\prox}{\mathrm{prox}}
\newcommand{\project}{\mathrm{project}}
\newcommand{\cccve}{CCC\{$v_\mathrm{e}$\}}
\newcommand{\ccckt}{CCC\{$K^\mathrm{trans}$\}}
\newcommand{\kt}{$K^\mathrm{trans}$}
\newcommand{\Ve}{$v_\mathrm{e}$}
\newcommand{\beq}{\begin{equation}}
\newcommand{\eeq}{\end{equation}}
\usepackage{diagbox}

\floatname{algorithm}{算法}  
\renewcommand{\algorithmicrequire}{\textbf{初始化：}}  
\renewcommand{\algorithmicensure}{\textbf{直到收敛，返回}}
%\renewcommand{\algorithmicrepeat}{\textbf{迭代，根据以下步骤更新：}}
\newcommand{\INDSTATE}[1][1]{\STATE\hspace{#1\algorithmicindent}}

\DeclareMathOperator*{\argmax}{arg\,max}

\newcommand{\myvec}[1]{\vec{#1}}% vector style
%%
%%% >>> Graphic Length Factor
%%
\newcommand*{\MyFactor}{0.8}% for single figure
\newcommand*{\MySubFactor}{0.48}% for subfigure
%%%%% --------------------------------------------------------------------------------
%%
%%%%*****************************User Configuration***********************************
%%
%%
%%% >>> Space and Skip
%%
%% Set line space in whole document by \linespread:
%\linespread{1.3}% 1.3 for "one and a half" line spacing, and 1.6 for "double" line spacing
%% skip distance for paragraphs
%\setlength{\parskip}{0.5ex plus 0.25ex minus 0.25ex}% vertical space before a paragraph.
%%
%%%>>> chapter section
% \usepackage{titlesec}
% \titlespacing*{\chapter} {0pt}{-5pt}{18pt}
% \titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
% \titlespacing*{\subsection} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
% \titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
%%
%%%>>> enumitem
\usepackage{enumitem}
\setenumerate[1]{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=3.0pt}
\setitemize[1]{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=3.0pt}
\setdescription{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=3.0pt}
%%
%%% >>> Toc Style
%%
\setcounter{tocdepth}{2}% specifies what depth to take the Table of Contents to.
\setcounter{secnumdepth}{3}% the depth for section numbering occurs, default is 2(subsub).

%\theoremstyle{definition}
%\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers
%\newtheorem{exmp}[thm]{Example} % same for example numbers
%\newtheorem{theorem}{Theorem}
%\newtheorem{claim}[theorem]{Claim}
%\newtheorem{proposition}[theorem]{Proposition}
%\newtheorem{lemma}[theorem]{Lemma}
%\newtheorem{corollary}[theorem]{Corollary}
%\newtheorem{conjecture}[theorem]{Conjecture}
%\newtheorem*{observation}{Observation}
%\newtheorem*{example}{Example}
%\newtheorem*{remark}{Remark}

\newtheoremstyle{break}% name
  {}%      Space above, empty = `usual value'
  {}%      Space below
  {\itshape}% Body font
  {}%         Indent amount (empty = no indent, \parindent = para indent)
  {\bfseries}% Thm head font
  {.}%        Punctuation after thm head
  {\newline}% Space after thm head: \newline = linebreak
  {}%         Thm head spec
%%
%%% >>> Grouping Figure/Equation Numbering by Section, Numberwithin.
%%
%% For long documents the numbering can become cumbersome as the numbers
%% reach into double and triple digits. To reset the counters at the
%% start of each section and prefix the numbers by the section number
%% include the following in the preamble.
%% The same can be done with similar counter types and document units such as "subsection".
%%
%% Get enumeration at the section level:
%\numberwithin{equation}{section}
%\renewcommand{\theequation}{\thesection\arabic{equation}}% configure the label style.
%\numberwithin{figure}{section}
%\renewcommand{\thefigure}{\thesection\arabic{equation}}% configure the label style.
%%
%% Get enumeration at the subsection level:
%\numberwithin{equation}{subsection}
%\renewcommand{\theequation}{\thesubsection\arabic{equation}}% configure the label style.
%\numberwithin{figure}{subsection}
%\renewcommand{\thefigure}{\thesubsection\arabic{equation}}% configure the label style.
%%
%%% >>> URL Style
%%
%% By default, URLs are printed using mono-spaced fonts. If you don't like it and
%% you want them to be printed with the same style of the rest of the text, you can use this:
%\urlstyle{same}
%%%%% --------------------------------------------------------------------------------
\endinput
%% End of custom.sty
%%%%% --------------------------------------------------------------------------------
